package com.day4;
import com.sun.org.apache.bcel.internal.generic.NEW;
import java.util.Scanner;
public class Jisuanqi{
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
        for (;;){
            System.out.println("请输入两个数:");
            int a = sc.nextInt();
            int b = sc.nextInt();
            System.out.println("0:加法运算,1:减法运算,2:乘法运算,3:除法运算,4:取余运算(输入其他数结束计算器)");
            int c = sc.nextInt();
            if (c == 0) {
                System.out.println(a + "+" + b + "=" + (a + b));
            } else if (c == 1) {
                System.out.println(a + "-" + b + "=" + (a - b));
            } else if (c == 2) {
                System.out.println(a + "*" + b + "=" + (a * b));
            } else if (c == 3) {
                System.out.println(a + "/" + b + "=" + (a / b));
            } else if (c == 4) {
                System.out.println(a + "%" + b + "=" + (a % b));
            } else {
                System.out.println("计算机结束");
                break;
            }
        }
    }
}
